<html>
<head><meta charset="utf-8"><title>overall strategy · t-compiler/wg-parallel-rustc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/index.html">t-compiler/wg-parallel-rustc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html">overall strategy</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="176408972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176408972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176408972">(Sep 23 2019 at 20:57)</a>:</h4>
<p>So I think we should discuss our overall strategy here. Unfortunately, I'm pretty sure <span class="user-mention" data-user-id="116010">@Aaron Turon</span> <em>won't</em> be putting more time into this effort after all. I think we have one fundamental choice, presuming of course we still want to ship (and I do!):</p>
<p>- we can try to complete the work of removing shared state <em>before</em>  we try to ship<br>
- or we can try to start getting people experimenting and find bugs the "ol' fashioned way".</p>
<p>Of course, the work of removing and refactoring shared state can continue in parallel (no pun intended).</p>
<p>We have previously planned to land the changes so that we build a parallel compiler by default and then give people a period to opt-in to testing, a period to opt-out, and eventually make this the default. This is kind of "second plan".  I kind of feel like we should being the period of making this available for people to pay with it, and we can pursue documentation / refactorings simultaneously. If we find people are not reporting a lot of bugs, that will also give us a lot of increased confidence, obviously.</p>
<p>The main downside is that we will suffer a (one-time) slowdown for sequential work, since we'll be shipping a parallel-enabled build by default. But IIRC we had kind of determined that this cost was pretty minimal before. </p>
<p>Anyway, maybe the first question is -- what is the best way to discuss this and how do we make the overall decision? We already had a design meeting where the state was roughly similar, and it seemed like we approved the overall plan, though I feel like there was also a desire to document more of the design (which has not really happened). Maybe we should just run from that consensus?</p>
<p>I've been talking to <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> about trying to do some of the "organizational" work involved here. I assume <span class="user-mention" data-user-id="116466">@Zoxc</span> will also be around to fix bugs that come up, and I think that probably we'd be able to also start to ramp up a small set of folks around that (e.g., <span class="user-mention" data-user-id="116122">@simulacrum</span>, <span class="user-mention" data-user-id="116114">@Paul Faria</span>). </p>
<p>Anyway, I wanted to kick off these conversations. (Also, cc <span class="user-mention" data-user-id="116083">@pnkfelix</span>)</p>



<a name="176409470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176409470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176409470">(Sep 23 2019 at 21:03)</a>:</h4>
<p>Based on <a href="#narrow/stream/187679-t-compiler.2Fwg-parallel-rustc/topic/Gathering.20parallel.20data" title="#narrow/stream/187679-t-compiler.2Fwg-parallel-rustc/topic/Gathering.20parallel.20data">https://rust-lang.zulipchat.com/#narrow/stream/187679-t-compiler.2Fwg-parallel-rustc/topic/Gathering.20parallel.20data</a> and my own recollections I don't think shipping a parallel compiler with -Zthreads=1 being the default is viable, that's a 10-20% perf hit on a single crate and 5% on a crate graph. We do recover that perf on crate graphs with ~2 threads (or more) but that still seems suboptimal. It's also unclear to me that we're ready from a pipelining etc perspective for rustc to consume more than 1 job token throughout the compilation -- I think that'd pretty much kill all of the benefits of pipelining due to starvation of tokens.</p>



<a name="176409582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176409582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176409582">(Sep 23 2019 at 21:04)</a>:</h4>
<p>Hmm, maybe we want to focus on knocking down those limitations first, then</p>



<a name="176409615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176409615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176409615">(Sep 23 2019 at 21:05)</a>:</h4>
<blockquote>
<p>what is the best way to discuss this and how do we make the overall decision?</p>
</blockquote>
<p>I think we can enable parallel compilers on the -alt builders today; this isn't really good from a "I want faster compiler" standpoint because those builders also ship with llvm asserts, but that does give us the advantage of having regular published builds</p>



<a name="176409788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176409788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176409788">(Sep 23 2019 at 21:07)</a>:</h4>
<p>Personally I think we should aim to get -Zthreads=1 to be at parity (&lt;5% loss on a <em>single</em> crate compilation) before we start shipping parallel compilers by default</p>



<a name="176409789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176409789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Paul Faria <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176409789">(Sep 23 2019 at 21:07)</a>:</h4>
<p>There's also definite race conditions if we ship as-is. I know the current cache predecessors can definitely dead lock, and that's not going to be fun for people to run into. I've being talking to <span class="user-mention" data-user-id="124288">@oli</span> in <a class="stream" data-stream-id="189540" href="/#narrow/stream/189540-t-compiler.2Fwg-mir-opt">#t-compiler/wg-mir-opt</a> about options for this one</p>



<a name="176409895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176409895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176409895">(Sep 23 2019 at 21:08)</a>:</h4>
<blockquote>
<p>Personally I think we should aim to get -Zthreads=1 to be at parity (&lt;5% loss on a <em>single</em> crate compilation) before we start shipping parallel compilers by default</p>
</blockquote>
<p>We set some threshholds before</p>



<a name="176409898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176409898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176409898">(Sep 23 2019 at 21:08)</a>:</h4>
<p>I'm trying to remember what they were</p>



<a name="176409902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176409902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176409902">(Sep 23 2019 at 21:08)</a>:</h4>
<p>Anyway, I think that's a reasonable goal</p>



<a name="176409913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176409913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176409913">(Sep 23 2019 at 21:09)</a>:</h4>
<blockquote>
<p>I think we can enable parallel compilers on the -alt builders today; this isn't really good from a "I want faster compiler" standpoint because those builders also ship with llvm asserts, but that does give us the advantage of having regular published builds</p>
</blockquote>
<p>This seems promising -- in particular, we could start asking people to help us test</p>



<a name="176409932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176409932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176409932">(Sep 23 2019 at 21:09)</a>:</h4>
<blockquote>
<p>There's also definite race conditions if we ship as-is. I know the current cache predecessors can definitely dead lock, and that's not going to be fun for people to run into. I've being talking to <span class="user-mention silent" data-user-id="124288">oli</span> in <a class="stream" data-stream-id="189540" href="/#narrow/stream/189540-t-compiler.2Fwg-mir-opt">#t-compiler/wg-mir-opt</a> about options for this one</p>
</blockquote>
<p>OK. I am not sure if it can really <em>dead lock</em> but I definitely agree that the design is not what we ultimately want.</p>



<a name="176409956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176409956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176409956">(Sep 23 2019 at 21:09)</a>:</h4>
<p>I mean ultimately having some kind of sense of "where the shared state is and what the protocols are for each one" being documented feels very good.</p>



<a name="176410002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410002">(Sep 23 2019 at 21:10)</a>:</h4>
<p>So maybe there are like two or three prongs to think about</p>



<a name="176410061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410061">(Sep 23 2019 at 21:11)</a>:</h4>
<p>- what do we need to do to get feedback from people in practice? (alt builds is a key enabler here!)<br>
- what do we need to ship <code>-Zthreads=1</code> enabled? (let's say 5%, as <span class="user-mention" data-user-id="116122">@simulacrum</span> wrote)<br>
- what are the "big pieces" that should be documented in rustc-guide, and how can we get motion on that?<br>
- how can we audit/document/refactor the shared state?</p>



<a name="176410167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410167">(Sep 23 2019 at 21:12)</a>:</h4>
<p>In particular, I didn't ask "when can we ship this", because that is perhaps informed by the results. i.e., if we start getting people using it and they are having problems, that's might push us to work more thoroughly through all locks/shared-state. If things are working ok but people aren't seeing speedups, that might also help us direct work. Finally, if things are working ok, people are seeing speed-ups, maybe we move more to shipping faster and let the doc effort trail behind.</p>



<a name="176410168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410168">(Sep 23 2019 at 21:12)</a>:</h4>
<blockquote>
<p>- what do we need to do to get feedback from people in practice? (alt builds is a key enabler here!)</p>
</blockquote>
<p>I think this is blocked on "what feedback do we want?" -- I think at this point we don't want to say "is this faster for you?" since it likely isn't or isn't as good as it can be</p>



<a name="176410190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410190">(Sep 23 2019 at 21:12)</a>:</h4>
<p>You mean because alt builds won't give us that</p>



<a name="176410199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410199">(Sep 23 2019 at 21:12)</a>:</h4>
<p>Or just because the overall perf doesn't scale amazingly</p>



<a name="176410209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410209">(Sep 23 2019 at 21:13)</a>:</h4>
<p>that, and also, based on what I saw -- we're not seeing like anywhere near linear scaling</p>



<a name="176410248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410248">(Sep 23 2019 at 21:13)</a>:</h4>
<p>like, if you throw 8 cores at rustc you don't see more than like ~20% gain at most, usually less, IIRC</p>



<a name="176410315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410315">(Sep 23 2019 at 21:14)</a>:</h4>
<p>Yes. I think that's..maybe ok.</p>



<a name="176410322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410322">(Sep 23 2019 at 21:14)</a>:</h4>
<p>I mean not amazing :)</p>



<a name="176410329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410329">(Sep 23 2019 at 21:14)</a>:</h4>
<p>but like 2x is 2x</p>



<a name="176410334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410334">(Sep 23 2019 at 21:14)</a>:</h4>
<p>well, 20% is not so great :)</p>



<a name="176410338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410338">(Sep 23 2019 at 21:14)</a>:</h4>
<p>I seem to recall cargo check was much better</p>



<a name="176410345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410345">(Sep 23 2019 at 21:14)</a>:</h4>
<p>at least in some cases</p>



<a name="176410376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410376">(Sep 23 2019 at 21:15)</a>:</h4>
<p>but regardless it seems like alt builds are going to help us most with flushing out bugs, and less so with perf wins</p>



<a name="176410379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410379">(Sep 23 2019 at 21:15)</a>:</h4>
<p>hm, perhaps. Anyway -- I think I can get a PR rolling for parallel-enabled alt builds</p>



<a name="176410402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410402">(Sep 23 2019 at 21:15)</a>:</h4>
<p>That'd at least get us to a point where you can reasonably simply bootstrap the rust compiler, for example, off of parallel rustc</p>



<a name="176410408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410408">(Sep 23 2019 at 21:15)</a>:</h4>
<p>I guess a downside of this is that if people try it out it might start getting a reputation as being slow, but we can probably message this appropriately (and clearly we wouldn't trumpet alt builds over the main rust blog or anything)</p>



<a name="176410509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410509">(Sep 23 2019 at 21:16)</a>:</h4>
<p>(It could be true that we say "hey, the LLVM asserts on these alt builders aren't buying as anything anyway, let's disable them and enable just parallel)</p>



<a name="176410567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410567">(Sep 23 2019 at 21:17)</a>:</h4>
<p>I have no idea how many people use that mechanism</p>



<a name="176410585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410585">(Sep 23 2019 at 21:17)</a>:</h4>
<p>I certainly never do but...</p>



<a name="176410596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410596">(Sep 23 2019 at 21:17)</a>:</h4>
<p>It.. might be feasible to find out based on e.g. cloudfront stats, not sure</p>



<a name="176410632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410632">(Sep 23 2019 at 21:18)</a>:</h4>
<p>folks from <span class="user-group-mention" data-user-group-id="1176">@WG-llvm</span> might have some idea -- hey, do y'all use alt builds to get llvm assertions enabled?</p>



<a name="176410650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410650">(Sep 23 2019 at 21:18)</a>:</h4>
<p>I sort of forget who requested them in the first place</p>



<a name="176410654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410654">(Sep 23 2019 at 21:18)</a>:</h4>
<p>I think it was us, the compiler team</p>



<a name="176410672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410672">(Sep 23 2019 at 21:18)</a>:</h4>
<p>I build my own build.</p>



<a name="176410841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410841">(Sep 23 2019 at 21:21)</a>:</h4>
<p>Ok.</p>



<a name="176410943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176410943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Paul Faria <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176410943">(Sep 23 2019 at 21:22)</a>:</h4>
<blockquote>
<p>OK. I am not sure if it can really <em>dead lock</em> but I definitely agree that the design is not what we ultimately want.</p>
</blockquote>
<p>After double checking, you're right. There's a case where the data gets computed twice, but no deadlock. My mistake. I was thinking back to a similar situation I ran into in C++</p>



<a name="176411081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411081">(Sep 23 2019 at 21:24)</a>:</h4>
<p>Still, I think the other concern that <span class="user-mention" data-user-id="116010">@Aaron Turon</span> raised is pretty possible. In particular, it's not hard to imagine that some of the existing structs have two fields under separate locks that need to be mutated atomically for correctness; under a ref-cell, you'd never be able to observe the 'in between' state, but this is not the case for locks.</p>



<a name="176411082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411082">(Sep 23 2019 at 21:24)</a>:</h4>
<p>Concretely it sounds like we want:</p>
<ul>
<li>Get parallel alt builds, possibly w/o llvm asserts for perf checking (I will do this)</li>
<li>Get someone (in addition to <span class="user-mention" data-user-id="116466">@Zoxc</span>) up to speed on what the primitives are, purpose, etc.<ul>
<li>Maybe delete some of the less useful primitives (e.g., Atomic&lt;T&gt; -&gt; AtomicU32 or w/e)</li>
</ul>
</li>
</ul>



<a name="176411121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411121">(Sep 23 2019 at 21:25)</a>:</h4>
<p>Yeah, and maybe try to avoid general purpose locks and replace them with safer patterns, etc</p>



<a name="176411188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411188">(Sep 23 2019 at 21:26)</a>:</h4>
<p>Indeed, yes -- I'm thinking that eventually we probably want to be at a place where <code>Lock</code> (or Mutex, etc) aren't really seen inside the compiler proper, since for the most part they aren't needed</p>



<a name="176411194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411194">(Sep 23 2019 at 21:26)</a>:</h4>
<p>ps <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> asked me what alt builds are under privmsg, I thought I'd answer here as probably lots of folks don't know :)</p>



<a name="176411217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411217">(Sep 23 2019 at 21:26)</a>:</h4>
<p>basically we publish an "alternative" version of our builds (all of them? I forget) that is build with different compiler flags than the standard distribution</p>



<a name="176411223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411223">(Sep 23 2019 at 21:26)</a>:</h4>
<p>didn't want to distract you from the wonderful discussion you're having :)</p>



<a name="176411232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411232">(Sep 23 2019 at 21:26)</a>:</h4>
<p>right now that is used to distribute a build with llvm assertions enabled :)</p>



<a name="176411238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411238">(Sep 23 2019 at 21:27)</a>:</h4>
<p>but we are discussing "repurposing" this channel</p>



<a name="176411258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411258">(Sep 23 2019 at 21:27)</a>:</h4>
<p>you can install them through rustup</p>



<a name="176411278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411278">(Sep 23 2019 at 21:27)</a>:</h4>
<p>I see <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="176411337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411337">(Sep 23 2019 at 21:28)</a>:</h4>
<blockquote>
<p>Concretely it sounds like we want:</p>
<ul>
<li>Get parallel alt builds, possibly w/o llvm asserts for perf checking (I will do this)</li>
<li>Get someone (in addition to <span class="user-mention silent" data-user-id="116466">Zoxc</span>) up to speed on what the primitives are, purpose, etc.<ul>
<li>Maybe delete some of the less useful primitives (e.g., Atomic&lt;T&gt; -&gt; AtomicU32 or w/e)</li>
</ul>
</li>
</ul>
</blockquote>
<p>ok it feels like we're making some sort of progress here</p>



<a name="176411355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411355">(Sep 23 2019 at 21:28)</a>:</h4>
<p>in particular, it feels like "it's premature to talk of shipping" but we should start by setting a variety of smaller goals</p>



<a name="176411376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411376">(Sep 23 2019 at 21:28)</a>:</h4>
<p>and a key first milestone is to get the seq overhead (<code>-Zthreads=1</code>) down to a level where we are comfortable flipping the switch</p>



<a name="176411387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411387">(Sep 23 2019 at 21:29)</a>:</h4>
<p>enabling alt builds is a way for us to <em>also</em> be advancing our confidence in correctness and gathering data in the meantime</p>



<a name="176411396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411396">(Sep 23 2019 at 21:29)</a>:</h4>
<blockquote>
<p>and a key first milestone is to get the seq overhead (<code>-Zthreads=1</code>) down to a level where we are comfortable flipping the switch</p>
</blockquote>
<p>for some reason I thought we were there already</p>



<a name="176411414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411414">(Sep 23 2019 at 21:29)</a>:</h4>
<p>hm, well, maybe we are -- but perhaps not yet there in terms of impl confidence</p>



<a name="176411482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411482">(Sep 23 2019 at 21:30)</a>:</h4>
<p>we should try to be sure I guess</p>



<a name="176411515"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411515" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411515">(Sep 23 2019 at 21:30)</a>:</h4>
<p>in particular I think deadlocking is fine at this point (alpha quality) but e.g. corrupting because we didn't lock for some intermediate bit is _not_</p>



<a name="176411525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411525">(Sep 23 2019 at 21:30)</a>:</h4>
<p>I kind of think neither is ok :)</p>



<a name="176411547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411547">(Sep 23 2019 at 21:30)</a>:</h4>
<p>I guess a good question is "what would help us increase our confidence" the most, though</p>



<a name="176411581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411581">(Sep 23 2019 at 21:31)</a>:</h4>
<p>I would personally want to see less sort of arbitrary field-level locks -- this might mean that we just have a doc on each, though, I guess</p>



<a name="176411595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411595">(Sep 23 2019 at 21:31)</a>:</h4>
<p>yes, I would be happy if we either (a) moved most of those locks to the outermost level or (b) documented the invariants cleanly</p>



<a name="176411605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411605">(Sep 23 2019 at 21:31)</a>:</h4>
<p>typically the latter would be done by (in my view) extracting a struct with the operations</p>



<a name="176411652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411652">(Sep 23 2019 at 21:32)</a>:</h4>
<p>well, that may be overkill. depends.</p>



<a name="176411804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176411804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176411804">(Sep 23 2019 at 21:34)</a>:</h4>
<p>(but comments at least :)</p>



<a name="176412236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176412236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176412236">(Sep 23 2019 at 21:40)</a>:</h4>
<p>I think it would be feasible to do that refactoring / extraction within the next month or so, depending on review queue</p>



<a name="176412293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176412293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176412293">(Sep 23 2019 at 21:41)</a>:</h4>
<p>yep</p>



<a name="176412399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176412399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176412399">(Sep 23 2019 at 21:42)</a>:</h4>
<p>I count 175 uses of \bLock\b in src/lib* :)</p>



<a name="176412403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176412403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176412403">(Sep 23 2019 at 21:42)</a>:</h4>
<p>not <em>that</em> many</p>



<a name="176412440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176412440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nikita Popov <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176412440">(Sep 23 2019 at 21:43)</a>:</h4>
<blockquote>
<p>folks from <span class="user-group-mention" data-user-group-id="1176">@WG-llvm</span> might have some idea -- hey, do y'all use alt builds to get llvm assertions enabled?</p>
</blockquote>
<p>Yeah, it's pretty convenient to get be able to get an assertion-enabled build via rustup-toolchain-install-master. TBH I thought that having LLVM assertions was the entire purpose of the alt builds.</p>



<a name="176412484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176412484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176412484">(Sep 23 2019 at 21:44)</a>:</h4>
<p>It was...</p>



<a name="176436946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176436946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176436946">(Sep 24 2019 at 06:43)</a>:</h4>
<blockquote>
<p>I think we can enable parallel compilers on the -alt builders today; this isn't really good from a "I want faster compiler" standpoint because those builders also ship with llvm asserts, but that does give us the advantage of having regular published builds</p>
</blockquote>



<a name="176436987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176436987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176436987">(Sep 24 2019 at 06:44)</a>:</h4>
<p>please ping me if you do that as crater is using alt builds today</p>



<a name="176436993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176436993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176436993">(Sep 24 2019 at 06:44)</a>:</h4>
<p>I just don't want our run times to get even slower</p>



<a name="176452916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176452916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176452916">(Sep 24 2019 at 11:05)</a>:</h4>
<p><span class="user-mention" data-user-id="121055">@Pietro Albini</span> Oh, for all runs?</p>



<a name="176452965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176452965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176452965">(Sep 24 2019 at 11:06)</a>:</h4>
<p>iirc we're only using alt builds</p>



<a name="176452976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/overall%20strategy/near/176452976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/overall.20strategy.html#176452976">(Sep 24 2019 at 11:06)</a>:</h4>
<p>/me goes off to add item to infra agenda to not do that</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>